<%@ page import="fleet_management.VehicleServicing" %>



<div class="fieldcontain ${hasErrors(bean: vehicleServicingInstance, field: 'vehicleNumber', 'error')} required">
	<label for="vehicleNumber">
		<g:message code="vehicleServicing.vehicleNumber.label" default="Vehicle Number" />
		<span class="required-indicator">*</span>
	</label>
	<g:if test="${vehicleServicingInstance?.vehicleNumber}">
		<g:textField name="vehicleNumber"
			value="${vehicleServicingInstance?.vehicleNumber}" disabled="disabled" />
	</g:if>
	<g:select name="vehicleNumber" from="${vehicleList}"
		value="${vehicleServicingInstance?.vehicleNumber}"
		noSelection="['':'Select vehicle number']" />
</div>

<div class="fieldcontain ${hasErrors(bean: vehicleServicingInstance, field: 'servicingDate', 'error')} required">
	<label for="servicingDate">
		<g:message code="vehicleServicing.servicingDate.label" default="Servicing Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="servicingDate" precision="day"  value="${vehicleServicingInstance?.servicingDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: vehicleServicingInstance, field: 'serviceKm', 'error')} required">
	<label for="serviceKm">
		<g:message code="vehicleServicing.serviceKm.label" default="Service Km" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="serviceKm" required="" value="${fieldValue(bean: vehicleServicingInstance, field: 'serviceKm')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: vehicleServicingInstance, field: 'mobilRefillingKm', 'error')} required">
	<label for="mobilRefillingKm">
		<g:message code="vehicleServicing.mobilRefillingKm.label" default="Mobil Refilling Km" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="mobilRefillingKm" required="" value="${fieldValue(bean: vehicleServicingInstance, field: 'mobilRefillingKm')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: vehicleServicingInstance, field: 'servicingDueDate', 'error')} required">
	<label for="servicingDueDate">
		<g:message code="vehicleServicing.servicingDueDate.label" default="Servicing Due Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="servicingDueDate" precision="day"  value="${vehicleServicingInstance?.servicingDueDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: vehicleServicingInstance, field: 'totalCost', 'error')} required">
	<label for="totalCost">
		<g:message code="vehicleServicing.totalCost.label" default="Total Cost" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="totalCost" required="" value="${fieldValue(bean: vehicleServicingInstance, field: 'totalCost')}"/>
</div>

